package server.controller.goodController;

import server.model.factory.ModelFactory;
import server.util.InfoUtils.Info;
import server.util.ResponseUtil;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/getGoodList")
public class GetGoodListServlet extends HttpServlet {
    private static final long serialVersionUID = 5702457229722003893L;

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        Info info = ModelFactory.getGoodInfoModel().getGoodList();
        ResponseUtil.responseMessage(resp, info);
    }

}